// hurtpool.txt
// Like a healing pool, but hurts.
// Cell 0 - which boom


beginobjectscript; 

variables;

short r1,range;

body;

beginstate INIT_STATE;
	range = get_memory_cell(2);
	if (range == 0)
		range = 2;
	break;

beginstate DEAD_STATE;

break;

beginstate START_STATE; // pool dark, waititng
	if (gf(73,19) == get_memory_cell(0)) {
		sf(73,19,0);
		if (gf(73,19) == 1) 
			print_str_color("The western pool explodes!",3);
			else print_str_color("The eastern pool explodes!",3);
		damage_nearby(300 + get_ran(1,0,100),6,5,2);
		pc_heard_sound(148);
		run_sparkles_on_object(ME,7,12,1);
	  		create_missile_spiral(142,40,6,2);
		}



break;

beginstate 3; // pool flaring
	if (am_i_doing_action() == FALSE) {
		set_state(START_STATE);
		}
break;
